package model;

import org.newdawn.slick.SlickException;

public class VertMovPlatform extends AgilePlatform
{
	// TODO brauchbare Werte finden
	private double vy = 0.003;
	private double topLimit = 0.15;
	private double currentPos = 0;
	
	public VertMovPlatform(double cX, double cY) throws SlickException
	{
		super(cX, cY);
	}
	
	public Type getType()
	{
		return Type.HOCHRUNTER;
	}
	
	
	
	@Override
	public void move()
	{
		if (currentPos >= topLimit || currentPos < 0)
		{
			vy *= -1;
		}
		setY(getY() + vy);
		currentPos += vy;
		if (super.misterJumpsOn())
		{
			Wrapper.getInstance().setMisterYGeschwindigkeit(.02);
		}
	}
	
}
